package laschools.team1.Zelda;

import java.util.Random;

public abstract class Character {
	protected int xPos;
	protected int yPos;
	protected double steps;
	protected int direction;
	protected int health = 6;
	protected boolean alive = true;
	protected Random gen = new Random();
	
	public void takeDamage(int amount) {
		health -= amount;
		if (health <= 0) {
			die();
		}
	}
	
	public int getHealth() {
		return health;
	}
	
	public void die() {
		alive = false;
	}
	
	public boolean getAlive() {
		return alive;
	}
	
	public int getXPos() { 
		return xPos;
	}
	
	public int getYPos() { 
		return yPos;
	}
	
	public double getNumSteps() {
		return steps;
	}
	
	public int getDirection() {
		return direction;
	}
	
	public void setXPos(int newX) {
		xPos = newX;
	}
	
	public void setYPos(int newY) {
		yPos = newY;
	}
}
